<html>
<head>
<meta content="text/html; charset=utf-8" />
<title>一个最简单的Javascript示例(仅使用document.write)</title></head>
<body>
<script type="text/javascript">

var a = 1;
var b = 2;
var string;
string = (a > b)?"Hello, World!":"<h1>Hello World!</h1>";
document.write(string);

</script>
</body>
</html>
